// 先行后列 https://iai.sh.cn/problem/829

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, m, c;
    cin >> n >> m >> c;
    c = c - 1;
    int hang = c / m + 1;
    int lie = c % m + 1;
    cout << hang << " " << lie;

    return 0;
}